import java.security.MessageDigest;
import org.apache.commons.codec.binary.*;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ByteArrayOutputStream;



public class md5 {

	/**
	 * @param args
	 */
	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		
		MessageDigest md5 = MessageDigest.getInstance("MD5");
		MessageDigest md52 = MessageDigest.getInstance("MD5");
		String str1 = "hello";
		String str2 = "hello";
		byte[] by1 = str1.getBytes("utf-8");
		byte[] by2 = str2.getBytes("utf-8");
		
		String  new1 = Hex.encodeHexString(md5.digest(by1));
		String  new2 = Hex.encodeHexString(md52.digest(by2));
		if(new1.equals(new2)){
			System.out.println(new1);
			System.out.println(new2);
		}
	}
	
	public String getMd5StringofFile(String file) throws Exception {
		
		String md5 = null;
		
		return md5;
		
	}

}
